package com.theta.gateway.infra.routecfg.model.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Getter;
import lombok.Setter;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 动态路由配置表，服务表
 * </p>
 *
 * @author theta
 */
@Getter
@Setter
@TableName("sgw_route_cfg")
public class RouteCfgEntity extends Model<RouteCfgEntity> {

    private static final long serialVersionUID = 1L;

    /**
     * router Id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    private String routeCode;
    /**
     * 路由路径
     */
    private String path;

    /**
     * 服务标识
     */
    private String serviceId;

    /**
     * 服务名称
     */
    private String serviceName;

    /**
     * 类型 1：资源  2：应用
     */
    private String type;

    /**
     * 图片
     */
    private String image;

    /**
     * url代理
     */
    private String uri;

    /**
     * 转发去掉前缀
     */
    private String stripPrefix;

    /**
     * 是否重试
     */
    private String retryable;

    /**
     * 状态 1：启用 0：禁用
     */
    private Integer status;
    
    private Integer orderNo;
    /**
     * 版本号
     */
    private String version;

    /**
     * 敏感请求头
     */
    @TableField("sensitiveHeaders_list")
    private String sensitiveheadersList;

    /**
     * 服务简介
     */
    private String serviceDescription;
    
    private String routeFilterJson;
    
    private String routePredicateJson;
    
    /**
     * 是否加入SSO
     */
    private Integer isJoinSso;
    /**
     * 认证校验URL
     */
    private String ssoAuthenticateUrl;
    /**
     * 认证排除URL
     */
    private String ssoAuthenticateExcludeUrl;
    
    
    private String createBy;
    /**
     * 创建时间
     */
    private String createTime;

    private String updateBy;
    /**
     * 更新时间
     */
    private String updateTime;

    /**
     * 删除标识（0-正常,1-删除）
     */
    private String delFlg;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getServiceId() {
        return serviceId;
    }

    public void setServiceId(String serviceId) {
        this.serviceId = serviceId;
    }

    public String getServiceName() {
        return serviceName;
    }

    public void setServiceName(String serviceName) {
        this.serviceName = serviceName;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getStripPrefix() {
        return stripPrefix;
    }

    public void setStripPrefix(String stripPrefix) {
        this.stripPrefix = stripPrefix;
    }

    public String getRetryable() {
        return retryable;
    }

    public void setRetryable(String retryable) {
        this.retryable = retryable;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    
    public Integer getOrderNo() {
		return orderNo;
	}

	public void setOrder(Integer orderNo) {
		this.orderNo = orderNo;
	}

    public String getSensitiveheadersList() {
        return sensitiveheadersList;
    }

    public void setSensitiveheadersList(String sensitiveheadersList) {
        this.sensitiveheadersList = sensitiveheadersList;
    }

    public String getServiceDescription() {
        return serviceDescription;
    }

    public void setServiceDescription(String serviceDescription) {
        this.serviceDescription = serviceDescription;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getDelFlg() {
        return delFlg;
    }

    public void setDelFlg(String delFlg) {
        this.delFlg = delFlg;
    }

    public String getRouteFilterJson() {
		return routeFilterJson;
	}

	public void setRouteFilterJson(String routeFilterJson) {
		this.routeFilterJson = routeFilterJson;
	}

	public String getRoutePredicateJson() {
		return routePredicateJson;
	}

	public void setRoutePredicateJson(String routePredicateJson) {
		this.routePredicateJson = routePredicateJson;
	}

	public String getCreateBy() {
		return createBy;
	}

	public void setCreateBy(String createBy) {
		this.createBy = createBy;
	}

	public String getUpdateBy() {
		return updateBy;
	}

	public void setUpdateBy(String updateBy) {
		this.updateBy = updateBy;
	}

	@Override
    protected Serializable pkVal() {
        return this.id;
    }

   

	@Override
    public String toString() {
        return "RouteCfg{" +
        "id=" + id +
        ", path=" + path +
        ", serviceId=" + serviceId +
        ", serviceName=" + serviceName +
        ", type=" + type +
        ", image=" + image +
        ", uri=" + uri +
        ", stripPrefix=" + stripPrefix +
        ", retryable=" + retryable +
        ", status=" + status +
        ", sensitiveheadersList=" + sensitiveheadersList +
        ", serviceDescription=" + serviceDescription +
        ", version=" + version +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", delFlg=" + delFlg +
        "}";
    }
}
